package net.yb.mapper;

import net.yb.dto.UserDTO;
import net.yb.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

// @Repository
@Mapper
public interface UserMapper {

    void insertUser(User user);

    void updateUser(User user);

    void deleteById(int id);

    User selectById(int id);

    List<User> selectAll();

    List<User> selectByUsername(String username);

    User selectByUsernameAndPassword(@Param("username") String username,@Param("password") String password);

    User selectByUsernameAndPassword2(UserDTO userDTO);

    User selectById2(int id);

    User selectById3(int id);

    List<User> selectByParams(User user);

    List<User> selectByParams2(User user);

    List<User> selectByParams3(User user);

    void updateUser2(User user);

    void insertUser2(User user);

    List<User> selectByIds(List<Integer> ids);

    void insertBatch(List<User> users);
}
